
//引入组件库
var app = sm("do_App");
var page = sm("do_Page");
var nf = sm("do_Notification");
var circleUrl = require("url/circle");
var http = require("helper/http");
var userUtil = require("helper/user");
var common = require("common");

var alayoutRoot = ui("alayoutRoot");
var btnRemove = ui("btnRemove");
//声明UI变量
var root=ui("$");  //$表示当前视图的根UI

root.setMapping({
	"alayoutRoot.tag" : "circleId",
	"btnRemove.tag" : "memberId"
});

var btnRemove = ui("btnRemove");
btnRemove.on("touch", function(data, e) {
	if(userUtil.loginToken()===""){
		nf.alert("您还没有登录哦.");
	}else{
		var circleId = alayoutRoot.tag;
		var memberId = btnRemove.tag;
		http.post(circleUrl.url.member.removeGrade,{"circleId":circleId,"memberId":memberId},function(data){
			page.fire("member_remove_grade");
		});
		
	}
})
